1. Field of Invention
The present invention relates generally to the distributed object oriented computing systems. More particularly, methods, data structures and devices are disclosed that are arranged to improve the performance of object invocation in distributed object systems.
2. Description of the Prior Art
A computing environment in which objects are located on different computers linked by a network is typically referred to as a client-server computing environment. Some of the computers act as providers of services or functionality to other computers. The providers of service or functionality are known as xe2x80x9cserversxe2x80x9d, and the consumers of the service or functionality are called xe2x80x9cclientsxe2x80x9d. The client-server model may also be generalized to the case where distinct programs running on the same computer are communicating with one another through some protected mechanism and are acting as providers and consumers of service or functionality.
Attempts to provide such a distributed system have been made using object-oriented methodologies that are based upon a client-server model in which server objects provide interfaces to client objects that make requests of the server objects. Typically, in such a distributed system, the servers are objects consisting of data and associated methods. The client objects obtain access to the functionalities of the server objects by executing calls on them, which calls are mediated by the distributed system. When the server object receives a call, it executes the appropriate method and transmits the result back to the client object. The client object and server object communicate through an Object Request Broker (ORB) which is used to locate the various distributed objects and to establish communications between objects. Distributed objects may exist anywhere in a network, as for example in the address space of the client, in multiple address spaces on the client machine, and in multiple machines across the network.
The software industry has responded to the need for a distributed object technology by forming the Object Management Group (OMG). The goal of the OMG is to define the Object Management Architecture (OMA), which has four major components: the Object Request Broker (ORB), Object Services, Common Facilities, and Application Objects. The Object Request Broker provides basic object communications and management services, thereby forming the basis of a distributed object system. A standard for an Object Request Broker is contained in the Common Object Request Broker Architecture (CORBA) specification.
In typical client-server, or distributed object, systems, the architecture is arranged such that regardless of the relative locations of a client and a server, a predetermined invocation path is used to route a request from a client to a server. That is, a request is routed through substantially the same layers of the system, regardless of whether the client and the server are in the same or different processes. This use of the same path for both local calls, i.e. the calls to servers located in the same process, and remote calls, i.e. calls to servers located in different processes is inefficient. Specifically, when the client and the server are in the same process, the transport level functions of marshaling a request for transfer from the client to the server and subsequently unmarshaling the request are unnecessary and prove to be an inefficient use of computing overhead. Accordingly, a method for reducing computing overhead by utilizing different invocation paths that are chosen based upon whether a client and a server are located within the same or different processes would be desirable to improve the overall performance of object invocation.
To achieve the foregoing and other objects and in accordance with the purpose of the present invention, data structures, methods and devices for reducing computing overhead by utilizing different invocation paths in a distributed client/server based computing system are disclosed. In one aspect of the invention, calls to a servant that do not share the same process as the requesting client are routed through a transport layer, and calls to servants that do share the same process as the requesting client are passed directly to the servant thereby bypassing the transport layer.
In another aspect of the invention, a distributed client/server computing system is provided which includes a plurality of client representations, a remote method table and a local method table. The distributed client/server based computing system is arranged to utilize object references which uniquely identify associated objects. Each object reference has an associated client representation, whereas selected client representations may be associated with a plurality of distinct object references. The remote method table is arranged to identify remote dispatch methods associated with a first set of the client representations. The remote dispatch methods are arranged to cause invocation requests to be routed through a transport layer. In contrast, the local method table is arranged to identify local dispatch methods associated with a second set of the client representations. The local dispatch methods are arranged to cause invocation requests to pass to a servant without being routed through the transport layer, thereby reducing the computing overhead associated with the invocation of local objects.
In one embodiment of the invention, the object references each include a first pointer arranged to identify an associated client representation and a second pointer arranged to identify an associated one of the method tables. In another embodiment, each method table includes a plurality of pointers arranged to directly or indirectly identify associated stubs. In this arrangement, each object reference that includes a pointer to a selected one of the methods tables has an associated set of stub functions that is pointed to by the selected method table. In some embodiments, multiple remote or local method tables are provided. In other embodiments, at least some of the client representations have both an associated remote method table and an associated local method table.
In another aspect of the invention, the methods that create object references that are to be used by a server, are arranged to intelligently determine whether the object reference should include a pointer to a local or a remote method table. By way of example, such object reference creating methods may include narrow methods, data object reference unmarshaling functions, and object reference destringifying methods.